package psd.model.Prolog.Converters;

import org.eclipse.jdt.core.dom.BooleanLiteral;

import psd.model.IConverter;
import psd.model.Prolog.FactGenerationToolbox;
import psd.model.Prolog.PrologConverter;


public class PrologBooleanLiteralConverter extends PrologConverter implements
IConverter<BooleanLiteral>{

	public PrologBooleanLiteralConverter(FactGenerationToolbox toolbox) {
		super(toolbox);
	}

	@Override
	public boolean convert(BooleanLiteral node) {
		 String args[] = {
		            typeResolver.getTypeTerm(node), (new StringBuilder("'")).append(node.booleanValue()).append("'").toString()
		        ,this.getFilePath(node), this.getLineNumber(node)};
		        createBodyFact(node, "literalT", args);
		        return true;
	}

}
